package com.hzncc.flowable_diboot.contract.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.file.entity.FileRecord;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.contract.entity.ContractAuditCancel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
* 合同取消 VO定义
* @author MyName
* @version 1.0
* @date 2024-09-06
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class ContractAuditCancelListVO extends ContractAuditCancel  {
private static final long serialVersionUID = 1406921357306872747L;
    /**
    * 合同评审类别 关联字典选项
    */
    @BindDict(
    type = "reviewCategory",
    field = "contractAuditCategory"
    )
    private LabelValue contractAuditCategoryLabel;

    /**
    * 合同类型 关联字典选项
    */
    @BindDict(
    type = "contractType",
    field = "contractType"
    )
    private LabelValue contractTypeLabel;

    /**
    * 产品类型 关联字典选项
    */
    @BindDict(
    type = "contractProductType",
    field = "productType"
    )
    private LabelValue productTypeLabel;

    /**
    * 发货情况 关联字典选项
    */
    @BindDict(
    type = "deliverySituation",
    field = "sendOutStatus"
    )
    private LabelValue sendOutStatusLabel;

    /**
    * 开票情况 关联字典选项
    */
    @BindDict(
    type = "invoiceSituation",
    field = "invoiceStatus"
    )
    private LabelValue invoiceStatusLabel;

    /**
    * 退票情况 关联字典选项
    */
    @BindDict(
    type = "ticketRefund",
    field = "invoiceReturnStatus"
    )
    private LabelValue invoiceReturnStatusLabel;

    /**
    * 退货情况 关联字典选项
    */
    @BindDict(
    type = "returnedWarehouse",
    field = "rebackStatus"
    )
    private LabelValue rebackStatusLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;


    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.applicant = id"
    )
    private String applicantName;

    /**
     * 客户ID
     */
    private String customerId;

    /**
     * 客户姓名
     */
    private String customerName;

    /**
     * 暂存还是提交
     */
    private boolean submit;

    @BindEntityList(
            entity = FileRecord.class,
            condition = "this.auditAttachment = id",
            splitBy = ","
    )
    private List<FileVO> auditAttachmentFiles;

    /**
     * 合同签约时间
     */
    private LocalDateTime contractSignTime;

    /**
     * 销售人员
     */
    private String salesPerson;

    /**
     * 客户性质
     */
    private String customerNature;

    /**
     * 配套机床型号
     */
    private String machineModel;

    /**
     * 合同金额
     */
    private String contractAmount;

    /**
     * 合同折扣
     */
    private String contractDiscount;

    /**
     * 订购型号
     */
    private String orderModel;

    /**
     * 合同数量
     */
    private String contractNum;

}